﻿<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>忘记密码</title>
    <link rel="stylesheet" href="css/忘记密码.css">

    <script src="../首页附件/js/jquery-1.12.4.js"></script>
    <script src="js/前后端数据交互.js"></script>
</head>

<body>
    <h1>好恰恰重置密码中心</h1>
    <div class="container">
        <h2 style="text-align: center;">忘记密码</h2>
        <form>
            <label>请输入您的用户名:</label>
            <input type="text" id="username" name="username" required>
            <label>请输入您的邮箱:</label>
            <input type="text" id="email" name="email" required>
            <button id="submit">提交</button>
        </form>
    </div>

    <script>
        // 事件监听器
        document.getElementById('submit').addEventListener('click', function (e) {
            e.preventDefault(); // 阻止表单默认提交

            const username = $('#username').val();
            const email = $('#email').val();

            forget_pwd(username, email); // 调用函数并传递输入值
        });

        getRequest('forget');
    </script>
</body>

</html>